package java_objects.this_pointer;

public class UserAlert {
	
	public static void main(String[] args) {
		
		// Method #1
		
		
		new User("Robert");
		new User("Wilson");
		new User("Nasir");
		new User("John");
		new User("Yuvaraj");
		
		// Method #2
		
		// Create a new User and pass to send method
		// Comment UserAlert.send(this) in User class 
		/*
		send(new User("Robert"));
		send(new User("Wilson"));
		send(new User("Nasir"));
		send(new User("John"));
		send(new User("Yuvaraj"));
		*/
		
		System.out.println("Total users =  " + User.nUsers);
	}
	
	static void send(User ref){
		System.out.println(ref.userName + " ... has been created ...");
	}

}
